package lec03.am;

public class Array2D {
	static void print2DArray(int a[][]) {
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.print(a[i][j] + " ");
			}
			System.out.println();
		}
	}

	public static void main(String[] args) {
		int a[][] = { { 1, 2, 3 }, { 4, 5 }, { 6, 7, 8 } };
		print2DArray(a);
		System.out.println("a.length="+a.length);
		System.out.println("a[0].length="+a[0].length);
		System.out.println("a[1].length="+a[1].length);
		System.out.println("a[2].length="+a[2].length);

	}
}
